import request from '@/utils/request'

// 发布微信文章
export function publishArticle(articleId) {
  return request({
    url: '/pcwl/article/publishArticle/'+ articleId,
    method: 'put'
  })
}
// 同步微信文章
export function syncArticle() {
  return request({
    url: '/pcwl/article/syncArticle',
    method: 'get'
  })
}
// 查询Article列表
export function loadDataList(query) {
	return request({
		url: '/pcwl/article/list',
		method: 'get',
		params: query
	})
}
// 新增Article
export function addArticle(data) {
	return request({
		url: '/article/add',
		method: 'post',
		data: data
	})
}
//查询Article详细
export function getArticleById(articleId) {
	return request({
		url: '/pcwl/article/getArticleById/' + articleId,
		method: 'get',
	})
}
//修改Article
export function updateArticleById(data,articleId) {
	return request({
		url: '/pcwl/article/updateArticleById/'+articleId,
		method: 'put',
		data: data
	})
}
//删除Article
export function delArticleById(articleId) {
	return request({
		url: '/article/deleteArticleById/'+articleId,
		method: 'delete',
	})
}
